<?php
$time_start = microtime(true);
define( 'ABSPATH', dirname(__FILE__) . '/' );

require_once(ABSPATH. 'bpc_config.php');
require_once(ABSPATH. 'bpc_includes/bpc_request.php');
require_once(ABSPATH. 'bpc_lng/bpc_lng.php');

require_once(ABSPATH. 'bpc_includes/bpc_error.php');
require_once(ABSPATH. 'bpc_includes/bpc_auth.php');

require_once(ABSPATH. 'bpc_includes/bpd/bpd_load.php');
require_once(ABSPATH. 'bpc_includes/bpd/bpc_db_def.php');

require_once(ABSPATH. 'bpc_layout/bph/bph_load.php');
require_once(ABSPATH. 'bpc_layout/bpc_page.php');
require_once(ABSPATH. 'bpc_layout/bpc_navisql.php');
require_once(ABSPATH. 'bpc_layout/bpc_link.php');

require_once(ABSPATH. 'bpc_includes/bpc_input.php');
require_once(ABSPATH. 'bpc_includes/bpc_xml.php');

error_reporting(E_ALL);


$bpd_db = new BpdDb();
if ( !$bpd_db->Connect(BPD_HOST, BPD_USER, BPD_PASS) ){
	Bpc_die(ERR_DB_CONNECT);
}
else {
	if ( !$bpd_db->SelectDb(BPD_BASE) ){
		Bpc_die(ERR_DB_DATABASE);
	}
}

// Demarrage de la session
session_cache_limiter('private, must-revalidate');
session_start();

$tab_request = Array();
$tab_request['mode'] = request_mode();

/*
if (!CheckAuth()){
	header('location:index.php?mode=login');
}
*/
?>
